using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebFoundation;

namespace MHI.InspectionManager.Interfaces
{
	/// <summary>
	/// DevProcessimgroupT,table entity:dev_processimgroup_t 
	/// </summary>
	public class DevProcessimgroupT
	{
		public static readonly string KeyId;
		public static readonly string KeyGroupName;
		public static readonly string KeyGruopType;
		public static readonly string KeyGmtCreated;
		public static readonly string KeyPersonModified;
		public static readonly string KeyGmtModified;
		public static readonly string KeyStateInfo;
		public static readonly string KeyIsUse;
		public static readonly string KeyVersion;
		

		static DevProcessimgroupT()
		{
			KeyId = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.Id);
			KeyGroupName = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.GroupName);
			KeyGruopType = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.GruopType);
			KeyGmtCreated = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.GmtCreated);
			KeyPersonModified = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.PersonModified);
			KeyGmtModified = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.GmtModified);
			KeyStateInfo = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.StateInfo);
			KeyIsUse = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.IsUse);
			KeyVersion = ExpressionHelper.GetPropertyName<DevProcessimgroupT>(r => r.Version);
		}
		

		private long _id; 
		private string _groupName; 
		private string _gruopType; 
		private DateTime? _gmtCreated; 
		private string _personModified; 
		private DateTime? _gmtModified; 
		private float? _stateInfo; 
		private int _isUse; 
		private long _version; 
		

		/// <summary>
		///  Id, column: id required
		/// </summary>
		[DisplayName("编码")]
		[Required]
		public long Id
		{
			get{ return _id; }
			set
			{
				if(_id != value)
				{
					_id = value;
					NotifyOfChange(KeyId);
				}
			}
		}

		/// <summary>
		///  GroupName, column: group_name 
		/// </summary>
		[DisplayName("图片组名称")]
		public string GroupName
		{
			get{ return _groupName; }
			set
			{
				if(_groupName != value)
				{
					_groupName = value;
					NotifyOfChange(KeyGroupName);
				}
			}
		}

		/// <summary>
		///  GruopType, column: gruop_type 
		/// </summary>
		[DisplayName("图片组类型")]
		public string GruopType
		{
			get{ return _gruopType; }
			set
			{
				if(_gruopType != value)
				{
					_gruopType = value;
					NotifyOfChange(KeyGruopType);
				}
			}
		}

		/// <summary>
		///  GmtCreated, column: gmt_created 
		/// </summary>
		[DisplayName("创建时间")]
		public DateTime? GmtCreated
		{
			get{ return _gmtCreated; }
			set
			{
				if(_gmtCreated != value)
				{
					_gmtCreated = value;
					NotifyOfChange(KeyGmtCreated);
				}
			}
		}

		/// <summary>
		///  PersonModified, column: person_modified 
		/// </summary>
		[DisplayName("更新人")]
		public string PersonModified
		{
			get{ return _personModified; }
			set
			{
				if(_personModified != value)
				{
					_personModified = value;
					NotifyOfChange(KeyPersonModified);
				}
			}
		}

		/// <summary>
		///  GmtModified, column: gmt_modified 
		/// </summary>
		[DisplayName("更新时间")]
		public DateTime? GmtModified
		{
			get{ return _gmtModified; }
			set
			{
				if(_gmtModified != value)
				{
					_gmtModified = value;
					NotifyOfChange(KeyGmtModified);
				}
			}
		}

		/// <summary>
		///  StateInfo, column: state_info 
		/// </summary>
		[DisplayName("标识状态")]
		public float? StateInfo
		{
			get{ return _stateInfo; }
			set
			{
				if(_stateInfo != value)
				{
					_stateInfo = value;
					NotifyOfChange(KeyStateInfo);
				}
			}
		}

		/// <summary>
		///  IsUse, column: is_use 
		/// </summary>
		[DisplayName("是否可用")]
		[Required]
		public int IsUse
		{
			get{ return _isUse; }
			set
			{
				if(_isUse != value)
				{
					_isUse = value;
					NotifyOfChange(KeyIsUse);
				}
			}
		}

		/// <summary>
		///  Version, column: version 
		/// </summary>
		[DisplayName("版本")]
		[Required]
		public long Version
		{
			get{ return _version; }
			set
			{
				if(_version != value)
				{
					_version = value;
					NotifyOfChange(KeyVersion);
				}
			}
		}

		public event PropertyChangedEventHandler PropertyChanged;

		private void NotifyOfChange(string propertyName)
		{
			if (this.PropertyChanged != null)
			{
				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
			}
		}
	}
}
